Known Limitations 
=================
The Intel Premier Support website <https://premier.intel.com/> contains 
more up to date information on errata and the availability of new versions 
of the compiler. 

The following are known defects in the Intel C++ Compiler, which might 
be fixed in a future version. This list is divided into defects that 
can affect both C and C++, and defects that affect only C++ programs. 
Where relevant, the behavior of the Intel C++ Compiler is compared 
against the behavior exhibited by the Microsoft* Visual C++* Compiler. 

Long compile times possible when using old Microsoft Visual C++ Compiler
========================================================================

When using the Intel C++ Compiler in the Microsoft Visual Studio envirnoment,
the Microsoft compiler will be called to generate the dependency files used by
Visual Studio to control incremental recompilation. If your source contains code
which cannot be compiled by the version of the Microsoft compiler installed on
your machine, these files will not be correctly generated and incremental 
recompilation will not work correctly. 

The Streaming SIMD Extension Intrinsic header files cannot be compiled with
Microsoft Visual C++ Compilers earlier than Visual C++ V6 with the Processor
Pack installed. If you are working with Streaming SIMD Extensions, you should
install Visual C++ V6 together with the processor pack.

Name of libkrtl changed to libguide.
====================================

The name of the libkrtl.lib library is now libguide.lib. The libraries
libkrttlMD and libkrtlMT are now also replaced by libguide. That is, there
is only one library now, not three.

If you are linking old objects compiled with a previous version of the compiler
with this new compiler, you may have references to the old names in your object
files. You can overcome this, either by recompiling with the new compiler, or
by copying libguide to each of the old names: libkrtl.lib, libkrtlMD.lib and
libkrtlMT.lib.

Minor incompatibility between Intel's libm and directx libraries.
=================================================================

Intel's libm directory contains high performance implementations of 
many functions. One example is "pow". When using the Intel compiler,
these functions will normally be linked in in preference to those in
the Microsoft supplied libc. 

However, object modules in libc also contain undocumented entry points,
such as _CIpow. This is called by the direct x libraries. As a result,
if you link with direct x while using the Intel compiler, you will see 
a "doubly defined entry point _pow" message from the linker. 

This is normally fatal, but you can force the linker to generate an 
executable file in the Project/Settings/Linker settings. The resulting 
executable should work. 

Incompatibilities between Intel C++ and Visual C++ Processor Pack 
=================================================================

Microsoft recently released support for MMX, SSE and SSE2 instructions 
with the release of the Visual C++ Processor Pack. The ABI implemented 
in this compiler is not compatible with the Intel C++ Compiler. 

Attempting to use Intel supplied header files with Visual C++, or Visual 
C++ header files with Intel C++ will usually produce compilation errors. 
Attempting to mix binaries compiled with the two compilers which use 
MMX, SSE or SSE2 instructions or which pass associated types as parameters 
will usually fail. A work around is to compile all compilation units which 
contain MMX, SSE or SSE2 instructions or types with the Intel C++ Compiler. 


Defects Specific to Streaming SIMD Extensions Features 
======================================================

The compiler may incorrectly perform optimizations across use of the 
_mm_setcsr and _mm_sfence intrinsics. A work-around is to disable 
optimization for functions that use these intrinsics or to use inline 
assembly to access these instructions. 

Defects Affecting C and C++ Programs 
====================================

The Intel C++ Compiler does not allow initialization of an unsigned 
short array with a wide character literal string when the string is 
cast to unsigned short *. The following code fragment fails to compile 
with the Intel C++ Compiler for this reason: 

	struct { 
		unsigned short buf[32]; 
		} s = { (unsigned short *) L"hello" }; 

A workaround for this problem is to remove the cast to unsigned short *, 
because it is unnecessary. The same problem affects unsigned char arrays 
initialized with non-wide string literals. 

The Intel C++ Compiler issues an error if an identifier with a base type 
is redeclared using a different base type of the same size. The Microsoft 
Visual C++ Compiler generates a warning in this situation. 

The following code fragment fails to compile with the Intel C++ Compiler 
for this reason: 

	int a; 
	long a; 
	float a;

The Intel C++ Compiler generates an error for a character array 
initialization containing a mixture of characters and strings such as 
the following: 

	char a[5] = {'a', "bcd"};

The Microsoft Visual C++ Compiler supports this initialization. 

If both the /Yc (create precompiled header) and the /Yu (use precompiled 
header) options are specified on the same command line, the Intel C++ 
Compiler honors the last of these options seen. The Microsoft Visual 
C++ Compiler allows you to specify the /Yc and /Yu options on the same 
command line if both options have associated filenames and the filenames 
differ. 

Alignments are different when using assembled .asm files as compared 
to directly generated objects. 

In an inline asm block, the conditional jumps, jcxz and jecxz, should 
not be used to jump to another function. For instance, jcxz and jecxz 
will not have the correct target location in the following code: 

	int main(void); 
	void DoneThat(void); 
	void BeenThere(void); 
	int main() 
	{ 
	BeenThere(); 
	return 0; 
	} 
	void BeenThere() 
	{ 
	__asm jcxz DoneThat 
	__asm jecxz DoneThat 
	} 
	void DoneThat() 
	{ 
	exit(0); 
	} 

When a DLL's entry point has been modified via the /entry:<function 
linker option, the Intel C++ Compiler's normal runtime initialization 
required by the instrumented code (atexit() and I/O) is bypassed. The 
suggested workaround is to avoid user provided entry functions for DLL's 
if profiling is desired. 

Defects Affecting Only C++ Programs
===================================

The Intel C++ Compiler can generate incorrect code if an invocation of 
the alloca function (or of the A2W or W2A macro, which use alloca) 
appears in an argument list in which a parameter type has a copy 
constructor. This problem can occur even if the invocation of alloca 
appears as an argument to a nested function call. For example: 

	class X { public: X(X const &); }; 
	void f(X); 
	f(...g(...alloca(...)...)...); 

Incorrect code may be generated for the statement that calls f. This 
problem can be avoided by moving the invocation of alloca (or A2W or W2A) 
to a separate, previous statement, or by changing the parameter type. 
In the above example, by changing the parameter type of f from (X) to( 
X const &). 

If a class is derived from a class with a private copy constructor, 
and also has a constructor taking a reference to a base class, the 
Intel C++ Compiler can report access violations for code which MSVC++ 
accepts. For example: 

	class CObject {private: CObject(CObject const &);}; 
	class CMyObject1: public CObject { }; 
	class CMyObject2: public CMyObject1 { 
	public: CMyObject2(CMyObject1 const &); 
	}; 
	void f(CMyObject2); 
	void g(CMyObject2 &x) { 
	f(x); 
	} 

An error is reported against the call to f, because the (compiler-generated)
copy constructor is selected to do the copy, but the definition of the 
copy constructor can't be generated because of the private base-class 
copy constructor. With MSVC++, the user-declared constructor for CMyObject2 
is selected instead.

This problem can be avoided by adding a true copy constructor to the 
class containing the "pseudo" copy constructor (taking the base class 
reference). The definition of the true copy constructor can initialize 
the base class with the private copy constructor in the same way that 
the "pseudo" copy constructor does. 

Based pointers are not fully supported in C++ code. Although they are 
accepted (i.e. do not result in an error), they are not taken into 
account in name mangling, for example.

The Intel C++ Compiler does not fully support conversions between 
pointer-to-member types involving virtual base classes. Use of this 
feature may result in aborted compilations, and may also result in 
code which produces incorrect results at run-time. 

The Microsoft Visual C++ Compiler emits a warning when a call to an 
RTTI run-time function is required and RTTI support is disabled. If 
no other compilation unit is compiled with RTTI support enabled (the 
/GR option is specified), the program will fail at link time with an 
unresolved reference to an obscure symbol. Otherwise, the program might 
fail at run-time. 

The Intel C++ Compiler emits an error when this situation arises to 
prevent the possibility of tracking down a difficult run-time problem. 
You can avoid this error by specifying the /GR option to enable RTTI 
run-time support, or by specifying /Qw259 on the command line to 
downgrade the error to a warning. 

Limitations and Tool Notes
==========================

The following are limitations of the Intel C++ Compiler and of using 
the Intel C++ Compiler with Microsoft development tools. For information 
on other limitations consult the user's guide. 

Failure to Link When Using /Qipo Option 

When the /Qipo option is specified, programs compiled with the Intel 
C++ Compiler may fail to link. This note characterizes two known 
problems when /Qipo is used. 

When the /Qipo and /Gy options are specified, the compiler may generate 
an object file with more than 32K sections, exceeding the COFF32 limit 
for number of sections. The /Gy option is the default and is also active 
if the /O1 or /O2 options are specified. If this problem occurs, a 
linker error similar to the following is printed: 

Invalid or corrupt file. No symtab for comdat section 0xffff8000 

When the /Qipo and /Gy- options are specified, the compiler may generate 
an object file with more than 64K relocations. The Microsoft 32-Bit 
Incremental Linker, LINK.exe, fails to perform relocations beyond this 
64K limit. If this problem occurs, the user's program will fail at 
runtime with calls to address 0. 

Redefining Standard ANSI Library Functions in Your Program 

Programs that redefine standard ANSI library functions, like strcat(), 
atoi(), or memset() might fail to link with /Qprof_gen. This is because 
the runtime support linked in to support the program instrumented for 
profiling makes calls to some standard library routines that in turn 
may pull in other standard routines. Note that a program can redefine 
standard ANSI library functions legally only if the corresponding standard 
header files are not included. Furthermore, the routine must be defined 
as static. The workaround is to rename the user-defined version of the 
standard library function. 

Use of Friend Injection: Not Recommended Sometimes a class is a member 
of a namespace , and contains a friend declaration of a function not 
already declared. In such cases, the Intel C++ Compiler injects the 
function declaration into the namespace containing the class, even if 
the class definition is not lexically within the namespace definition. 

Microsoft Visual C++ Version 4.2 apparently "injects" the function 
declaration into the scope lexically containing the class definition. 
As a result of this difference, friendship may be bestowed on a different 
function, and access errors may result. Friend "injection" has recently 
been eliminated as a language feature by the C standardization committee. 
Microsoft Visual C++ Version 5.0 does not accept such code, reporting 
an error diagnostic message semantically equivalent to the Intel C++ 
Compiler.

Function Declaration in Function Scope of Function Defined in a Namespace 

In accordance with the C++ language specification, if a function 
declaration is encountered within a function definition, the function 
referenced is taken to be another member of the namespace of the 
containing function, whether or not the containing function definition 
is lexically within a namespace definition. The Microsoft Visual C++ 
Compiler takes the referenced function to be a global function (not in 
any namespace). Functions declared in global or namespace scope are 
interpreted the same way by both the Intel C++ Compiler and the Microsoft 
Visual C++ Compiler. 

Enum Bitfield Signedness 

The Intel C++ Compiler and the Microsoft Visual C++ Compiler differ in 
how they attribute signedness to bit-fields declared with enum type. 
Apparently, Microsoft Visual C++ always considers enum bit-fields to 
be signed, even if not all values of the enum type can be represented 
by the bit-field. On the other hand, the Intel C++ Compiler considers 
an enum bit-field to be unsigned, unless the enum type has at least 
one enum constant with negative value. In any case, the Intel C++ Compiler 
produces a warning if the bit-field is declared with too few bits to 
represent all the values of the enum type. 

Debugging Functions With Aligned Stack Frames Using Microsoft Visual C++ Version 4.2 

When debugging a function with an aligned frame compiled with the Intel 
C++ Compiler with the Microsoft Visual C++ Version 4.2 tools, the Visual 
C++ debugger will display invalid values for the parameters. This is due 
to the fact that the Version 4.2 linker does not support the needed debug 
records used to represent parameters in aligned frames. 

Ordinarily, when entering a function, the EBP register points to the 
bottom of the parameter block. The debugger accesses function parameters 
using the EBP register plus an offset. However, in an aligned frame the 
EBP register is decremented an arbitrary number of bytes, in order to 
align the frame, and a different register is used as a pointer to the 
parameters (see below). 

Simplified view of the stack: 
... 
-------- 
PARAMS 
-------- <--------- reg 
PADDING 
-------- <--------- EBP 
The Microsoft debug format supported by Visual C++ Version 4.2 does not 
allow flexibility in the base register used for parameter variable access, 
so the Visual C++ Version 4.2 debugger always uses EBP to access the 
parameters. This causes incorrect values to be displayed for the 
parameters, since they are not located at the expected address. 

To view parameters in aligned functions, you can use assembly level 
debugging to look at the actual location of the parameter. The Intel 
C++ Compiler uses the EBX register for parameter access in a function 
with an aligned frame. In such a function, parameters are located at 
the address specified by EBX plus an offset. Because of the padding 
that occurs within the parameter block to align __m128 parameters, it 
may be easier to determine the correct offset by examining a reference 
to the parameter of interest in the disassembled code. 

This problem does not affect use of the Intel C++ Compiler with the 
Visual C++ Version 5.0 tools. To use the Intel C++ Compiler with Visual 
C++ Version 5.0, you must install Visual C++ 5.0 and then re-install 
the Intel C++ Compiler. For more information on the aligned stack frame 
feature, see the note about /Qsfalign in the "What's New / Fixed Defects" 
section of these notes. 

New compiler flag added
=======================

A new compilation flag has been added to 5.0.

  /Qfp_port[-]  This option controls rounding down to float precision at assignments
                and casts to float. Enabling this option, with /Qfp_port, can assist in 
		the porting of programs which depend upon the limited precision of floats 
		for correct execution.

		Using /Qfp_port may cause some loss of performance, so the default is /Qfp_port[-].  
		However, when /Qax[KW] or /Qx[KW] is selected, these additional conversions are 
		fast, so the default is changed to /Qfp_port.

